package cn.iocoder.yudao.module.study.message.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;

import java.util.List;
import java.util.Map;

/**
 * @Author cjc
 * @Date 2024/3/19 16:13
 * @Description: 消息VO
 * @Version 1.0
 */
@Setter
@Getter
@NoArgsConstructor
@AllArgsConstructor
@ToString(callSuper = true)
public class MsgVO {

    @Schema(description = "消息配置类")
    private Map<String, List<MsgConfigItem>> msgConfigItemMap;

    @Schema(description = "接收人")
    private List<SubAccount> receiveAccount;

    @Schema(description = "发送人")
    private SubAccount sendAccount;

    @Schema(description = "业务类型")
    private String businessType;

    @Schema(description = "操作类型")
    private String operateType;

    @Schema(description = "参数")
    private Object params;

    @Schema(description = "url参数")
    private String urlParam;


    @Schema(description = "用户信息")
    @Data
    public static class SubAccount{

        @Schema(description = "主键")
        private Long id;

        @Schema(description = "用户名")
        private String username;

        @Schema(description = "姓名")
        private String nickname;
    }


    /**
     * 消息配置
     */
    @Schema(description = "消息配置")
    @Data
    public static class MsgConfigItem{

        @Schema(description = "主键")
        private Long id;

        @Schema(description = "消息类型")
        private String msgType;

        @Schema(description = "消息标题")
        private String msgTitle;

        @Schema(description = "消息内容")
        private String msgContent;

        @Schema(description = "链接地址")
        private String linkUrl;

        @Schema(description = "备注")
        private String remark;
    }
}
